package net.comm.group.web.form;

import net.comm.page.PageCtr;

import org.apache.struts.action.*;


public class GdpTotalForm extends ActionForm {

	private static final long serialVersionUID = 1L;
	private static final String KEY_SPLIT = "#,##,#,#,#";

	private int  QryGroupID;	//群组ID
	private int  QryVillageID;	//社区ID
	private String  QryDsort;		//	所属板块

	private int  	UserID;		//	用户ID
	private int  	GroupID;	//	群组ID
	private String  Dsort;		//	所属板块
	private int  	UpNum;		//	表扬
	private int  	DownNum;	//	批评
	private int  	Total;		//	合计
	private String  Mtime;		//	统计开始日期
			
	private String action = "";
	
	public GdpTotalForm() {
		super();
		// TODO Auto-generated constructor stub
		QryGroupID = 0;
		QryVillageID = 0;
		QryDsort = "";		//	所属板块
		
		UserID = 0;		//	用户ID
		GroupID = 0;
		Dsort = "";		//	所属板块
		UpNum = 0;		//	表扬
		DownNum = 0;		//	批评
		Total = 0;		//	合计
		Mtime = "";		//	统计开始日期		
	}

	/**
	 * 查询当前页主键值串
	 */
	private String key = "";

	/**
	 * 查询上上页主键值串
	 */
	private String lastKey = "";
	

	/**
	 * 分页控制对象
	 */
	private PageCtr page;
	



	public PageCtr getPage() {
		return page;
	}

	public void setPage(PageCtr page) {
		this.page = page;
	}
	
	/**
	 * @param key the key to set
	 */
	public void setKey(String key) {
		this.key = key;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String[] array) {
		if(key != null && key.trim().length() > 0) {
			key = "";
		}
		
		StringBuffer keyBuff = new StringBuffer();
		for (int i = 0; i < array.length; i++) 
		{
			/**
			 * 防止空字符串引起的split方法异常
			 */
			if(array[i] == null || array[i].length() == 0) {
				keyBuff.append(" ");
			} else {
				keyBuff.append(array[i]);
			}
			
			keyBuff.append(KEY_SPLIT);
		}
		
		key = keyBuff.toString();		
	}
	
	/**
	 * 获取lastKey值
	 * @return
	 */
	public String[] lastKey()
	{
		if(lastKey == null || lastKey.trim().length() == 0) {
			return null;
		}
		
		return lastKey.split(KEY_SPLIT);
	}
	
	public String getLastKey() {
		return lastKey;
	}

	public void setLastKey(String lastKey) {
		this.lastKey = lastKey;
	}	

	public String getAction() {
		return action;
	}
	public void setAction(String action) {
		this.action = action;
	}

	public static String getKEY_SPLIT() {
		return KEY_SPLIT;
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	public int getQryGroupID() {
		return QryGroupID;
	}

	public int getQryVillageID() {
		return QryVillageID;
	}

	public String getQryDsort() {
		return QryDsort;
	}

	public int getUserID() {
		return UserID;
	}

	public String getDsort() {
		return Dsort;
	}

	public int getUpNum() {
		return UpNum;
	}

	public int getDownNum() {
		return DownNum;
	}

	public int getTotal() {
		return Total;
	}

	public String getMtime() {
		return Mtime;
	}

	public void setQryGroupID(int qryGroupID) {
		QryGroupID = qryGroupID;
	}

	public void setQryVillageID(int qryVillageID) {
		QryVillageID = qryVillageID;
	}

	public void setQryDsort(String qryDsort) {
		QryDsort = qryDsort;
	}

	public void setUserID(int userID) {
		UserID = userID;
	}

	public void setDsort(String dsort) {
		Dsort = dsort;
	}

	public void setUpNum(int upNum) {
		UpNum = upNum;
	}

	public void setDownNum(int downNum) {
		DownNum = downNum;
	}

	public void setTotal(int total) {
		Total = total;
	}

	public void setMtime(String mtime) {
		Mtime = mtime;
	}

	public int getGroupID() {
		return GroupID;
	}

	public void setGroupID(int groupID) {
		GroupID = groupID;
	}




}